#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QObject>
#include <QThread>

class ThreadProducer : public QThread
{
    Q_OBJECT
private :
    bool m_stop=false; //停止线程
protected:
    void run() Q_DECL_OVERRIDE;
public:
    ThreadProducer(){};
    void stopThread() ;
};

class ThreadConsumer : public QThread
{
    Q_OBJECT
private:
    bool m_stop=false; //停止线程
protected:
    void run() Q_DECL_OVERRIDE;
public:
    ThreadConsumer(){};
    void stopThread();
signals:
    void newValue(int seq, int diceValue) ;
};

#endif // MYTHREAD_H
